package cn.it.shop.action;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Scope;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Controller;

import freemarker.template.utility.Execute;

/*
 * 此Action主要用来转发请求, 不处理业务逻辑,所以也不需要继承BaseAction, 单例即可
 * */
@Controller
public class SendAction {
	
	public SendAction(){
		System.out.println("---SendAction()---");
	}

	public String execute(){
		return "send";
	}
	@PostConstruct
	public void init(){
		System.out.println("----SendAction init----");
	}
	@PreDestroy
	public void destory(){
		System.out.println("-----SendAction destory-----");
	}
	
	public static void main(String[] args) {
		ClassPathXmlApplicationContext context=new ClassPathXmlApplicationContext("applicationContext-*.xml");
		context.destroy();
	}
}
